<!-- 用户列表 -->
<div class="pcontent">
<h3>权限设置<a class="btn btn-info btn-sm pull-right" href="javascript:history.back()" >返回</a></h3>
<form action="{:U('/Access/access_save')}" method="POST">
<input type="hidden" name="role_id" value="{$role_id}" />
<volist name="list" id="m">
	<table class="m_box table table-border">
		<thead>
			<tr>
				<th colspan="2">
					<span class="label label-sm label-success">
						<label>
							<input name="f_mod[]" type="checkbox" {$m.ischeck} class="level{$m.level}" d_val="{$m.level}" value="{$m.id}"> {$m.title} 
						</label>
					</span>
				</th>
			</tr>
		</thead>
		<tbody  class="c_box">
		<volist name="m.child" id="c">
			<tr class="ab_box">
				<td width="120px"> 
					<span class="label label-info">
						<label>
							<input name="f_con[]" type="checkbox" {$c.ischeck} class="level{$c.level}" d_val="{$c.level}" value="{$c.id}"> {$c.title}
						</label>
					</span>
				</td>
				<td class="a_box">
					<volist name="c.child" id="a" >
						<span class="label label-warning">
							<label>
								<input name="f_act[]" type="checkbox" {$a.ischeck} class="level{$a.level}" d_val="{$a.level}" value="{$a.id}"> {$a.title}
							</label>
						</span>
					</volist>
				</td>
			</tr>
		</volist>
		</tbody>
	</table>
</volist>
<table class="table table-noborder">
<tr>
	<td>
		<input type="submit" class="btn btn-sm btn-info" value="保存" />		
	</td>
</tr>
</table>
</form>
</div>
<script language="javascript">
$(function(){
	$('input.level1').click(function(){
		$(this).parents('.m_box').find('input').prop('checked',$(this).prop('checked'));
	});
	$('input.level2').click(function(){
		$(this).parents('.ab_box').find('input').prop('checked',$(this).prop('checked'));
	});
});
</script>
<!-- 添加用户 -->